import os, logging, random

from google.appengine.dist import use_library
use_library('django', '1.2')

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

from HomePage       import HomePage
from HomePage_r     import HomePage_r
from LP             import LP

ROOT_PATH = os.path.dirname(__file__)
TEMPLATE = os.path.join(ROOT_PATH, 'templates')

routes = [
        ('/', HomePage),
        (r'/r/', HomePage_r),
        (r'/r/like(.*).html', LP), 
        ]

application = webapp.WSGIApplication(routes, debug=True)

def main():
    logging.getLogger().setLevel(logging.DEBUG)
    run_wsgi_app(application)

if __name__ == "__main__":
    main()
